<?php
/**
 * @package		Joomla.Site
 * @subpackage	mod_articles_latest
 * @copyright	Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>
<script type="text/javascript">
jQuery(function($){
	$('.carousel').jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible:1, auto:5000, speed:1000});
});
</script>
<div class="carousel<?php echo $moduleclass_sfx; ?>">
<ul>
<?php foreach ($list as $item) :  $images = json_decode($item->images); 
	if($images->image_intro=='') $images->image_intro = 'images/default-image.jpg';
	?>
	<li>
		<h2><a href="<?php echo $item->link; ?>" title='<?php echo $item->title; ?>'>
        	<img width="100%" src="<?php echo htmlspecialchars($images->image_intro); ?>" alt="<?php echo htmlspecialchars($images->image_intro_alt); ?>"/>
			<span class="title"><?php echo $item->title; ?></span>
        </a></h2>
        <div class="date"><?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $item->publish_up, JText::_('DATE_FORMAT_LC4'))); ?>
</div>
	</li>
<?php endforeach; ?>
</ul>
</div>
<div class="prevnext"><button class="prev"><</button><button class="next">></button></div>